#region Using References

using System;
using System.Diagnostics.CodeAnalysis;
using Beaker.OpenCube.NbtEditor.ViewModels;
using Beaker.OpenCube.Specs.Builders;

#endregion

namespace Beaker.OpenCube.Specs.NbtEditor.ViewModels.Builders
{
	/// <summary>
	/// Builds new instances of <see cref="ViewModel"/>.
	/// </summary>
	[ExcludeFromCodeCoverage]
	public class ViewModelBuilder
		: Builder<ViewModelTester>
	{
		private string _value;

		public ViewModelBuilder WithValue( string value )
		{
			_value = value;
			return this;
		}

		private Action<string, string> _onValueChanged;

		public ViewModelBuilder WithOnValueChangedHandler( Action<string, string> onValueChanged )
		{
			_onValueChanged = onValueChanged;
			return this;
		}

		protected override ViewModelTester OnBuild()
		{
			return new ViewModelTester( _value, _onValueChanged );
		}
	}
}